package day017.lambda;

import java.util.Random;

public class LambdaTest3 {
    public static void main(String[] args) {
        useRandomHandler(() -> {
            return new Random().nextInt(10) + 1;
        });
    }

    public static void useRandomHandler(RandomNumHandler randomNumberHandler) {
        int number = randomNumberHandler.getNumber();
        System.out.println(number);
    }
}
